package persistence;

public class Bookbinder {
	private int id=0;
	private String name;
	private String street;
	private City city;
	
	protected Bookbinder(){}
	
	protected Bookbinder(int id, String name, String street, City city){
		setId(id);
		setName(name);
		setStreet(street);
		setCity(city);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Bookbinder other = (Bookbinder) obj;
		if (id != other.id)
			return false;
		return true;
	}

	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getStreet() {
		return street;
	}

	public City getCity() {
		return city;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public void setCity(City city) {
		this.city = city;
	}
	
	
}
